package com.ayoka.parenting.ui.group.detail;

import android.app.Activity;

import com.ayoka.parenting.bean.BaseResponse;
import com.ayoka.parenting.bean.CircleGroupBean;
import com.ayoka.parenting.bean.PagerBean;
import com.ayoka.parenting.bean.TopicBean;
import com.ayoka.parenting.interf.RequestCallback;
import com.ayoka.parenting.mvp.BasePresenter;
import com.ayoka.parenting.mvp.BaseView;

/**
 * @ProjectName: MVPPlugin.
 * @ClassName: GroupDetailContract.
 * @Description: .
 * @Author: jincp.
 * @CreateDate: 2019/10/10 18:17.
 */
public class GroupDetailContract {

    interface View extends BaseView {
        void configCircleGroupDetail(CircleGroupBean data);

        void configCircleGroupTopicListData(PagerBean<TopicBean> data);

        void onJoinCircleCallback(boolean isSuccess);

        void onQuitCircleCallback(boolean isSuccess);

        void onPraiseTopicCallback(boolean isSuccess, int position);

        void onCancelPraiseTopicCallback(boolean isSuccess, int position);

        void onDeleteTopicCallback(boolean isSuccess, int position);

        void onTopTopicCallback(boolean isSuccess, int position);

        void onCancelTopTopicCallback(boolean isSuccess, int position);
    }

    interface Presenter extends BasePresenter<View> {
        void getCircleGroupDetail(String circleGroupId);

        void getCircleGroupTopicListData(boolean isShowWaitDialog, String circleGroupId, int pageNo, int pageSize);

        void showCircleOperatorPopupWindow(Activity activity, android.view.View view, String GroupOwnerId, TopicBean topicBean, int position);

        void joinCircle(String circleGroupId);

        void quitCircle(String circleGroupId);

        void praiseTopic(String topicId, int position);

        void cancelPraiseTopic(String topicId, int position);
    }

    interface Model {
        void getCircleGroupDetail(BasePresenter presenter, String circleGroupId, RequestCallback<CircleGroupBean> requestCallback);

        void getCircleGroupTopicListData(BasePresenter presenter, String circleGroupId, int pageNo, int pageSize, RequestCallback<PagerBean<TopicBean>> requestCallback);

        void joinCircle(BasePresenter presenter, String circleGroupId, RequestCallback<BaseResponse> requestCallback);

        void quitCircle(BasePresenter presenter, String circleGroupId, RequestCallback<BaseResponse> requestCallback);

        void praiseTopic(BasePresenter presenter, String topicId, RequestCallback<BaseResponse> requestCallback);

        void cancelPraiseTopic(BasePresenter presenter, String topicId, RequestCallback<BaseResponse> requestCallback);

        void deleteTopic(BasePresenter presenter, String topicId, RequestCallback<BaseResponse> requestCallback);

        void topTopic(BasePresenter presenter, String topicId, RequestCallback<BaseResponse> requestCallback);

        void cancelTopTopic(BasePresenter presenter, String topicId, RequestCallback<BaseResponse> requestCallback);
    }
}
